package com.sxzbxc.weixin.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.sxzbxc.weixin.dao.DicCompaniesDao;
import com.sxzbxc.weixin.entity.DicCompanies;
import com.sxzbxc.weixin.service.DicCompaniseServiceI;

@Service("dicCompaniseServiceImpl")
@Transactional
public class DicCompaniseServiceImpl implements DicCompaniseServiceI {

	@Autowired
	private DicCompaniesDao dicCompaniesDao;
	
	@Override
	public List<DicCompanies> loadAll() {
		List<DicCompanies> loadAll = dicCompaniesDao.loadAll();
		return loadAll;
	}

	@Override
	public void insertSelective(DicCompanies entity) {
		dicCompaniesDao.insertSelective(entity);
	}

	@Override
	public DicCompanies selectByPrimaryKey(String id) {
		DicCompanies dicCompanise = dicCompaniesDao.selectByPrimaryKey(id);
		if(dicCompanise!=null){
			return dicCompanise;
		}
		return null;
	}

	@Override
	public void updateByPrimaryKeySelective(DicCompanies record) {
		dicCompaniesDao.updateByPrimaryKeySelective(record);
	}

	@Override
	public void deleteByPrimaryKey(String id) {
		dicCompaniesDao.deleteByPrimaryKey(id);
	}

}
